package com.xuxueli.xxlrpc.remoting.invoker.call;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2022/5/29 16:53
 */
public enum CallType {
    
    SYNC,
    FUTURE,
    CALLBACK,
    ONEWAY;

    public static CallType match(String name, CallType defaultCallType) {
        for (CallType item : CallType.values()) {
            if (item.name().equals(name)) {
                return item;
            }
        }
        return defaultCallType;
    }
}
